import type { NormalTripData } from '@/types/api'

interface FetchNotInvoicedOrderListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    total: number
    per_page: string
    current_page: number
    last_page: number
    data: NormalTripData[]
  }
}

interface FetchNotInvoicedOrderListAPIParams {
  page: string
  limit: string
}

export function fetchNotInvoicedOrderListAPI(params: FetchNotInvoicedOrderListAPIParams, token: string) {
  return httpInstance.get<FetchNotInvoicedOrderListAPIResData, FetchNotInvoicedOrderListAPIParams>(
    '/api/order/invoiceorderlist',
    { params, headers: { token } },
  )
}
